var express = require("express");
var router = express.Router();
const { updata } = require("./database.js");

/* GET home page. */
router.post("/", async function (req, res, next) {
  // 去数据库查找是否有相同的
  await updata({ online: true }, { online: false });
  res.send({ result: true });
});

module.exports = router;
